<%---------- init page ----------%>
<%@ page 
	language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
	import="com.cdshop.web.PageUtil,com.cdshop.entity.User"
%>
<%
	User model= PageUtil.loginUser(pageContext);
%>
<%---------- show ----------%>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title></title>
  <%@ include file="../inc/default.jsp" %>
</head>
<body>
 <div id="container" style="display:inline-table;">
 	<div id="top_banner">
			<%  com.cdshop.entity.User user=PageUtil.loginUser(pageContext);
				if(user==null){%>
			<a href="javascript:HJS.login();void 0;" class="top_font">登录</a>
			<a href="javascript:HJS.register();void 0;" class="top_font">注册</a>
			<%}else{%>
			<span class="top_font">欢迎您 <%=user.getNickname() %></span>
			<a href="javascript:HJS.shoppingCart();void 0;" class="top_font">购物车   </a>
			<a href="javascript:HJS.profile();void 0;" class="top_font">个人情况    </a>
			<a href="javascript:HJS.logout();void 0;" class="top_font">退出</a>
			<%}%>
	</div>
	<%@ include file="../inc/head.jsp" %>
	<div id="content">
		<div align="center">
			<h1>用户信息</h1>
			<form id="regForm" action="registerAction.jsp" method="post" enctype="application/x-www-form-urlencoded">
			<table cellpadding="0" cellspacing="0" style="table-layout:auto;">
				<tr>
			      <td height="30" align="right">用户名：</td>
			      <td align="left">
			      	<span><%= PageUtil.string(model.getUsername())%></span>
			      </td>
			    </tr>
			    
			    <tr>
			      <td height="30" align="right">昵称：</td>
			      <td align="left">
			      	<span><%= PageUtil.string(model.getNickname())%></span>
			      </td>
			    </tr>
			    
			    <tr>
			      <td height="30" align="right">邮箱：</td>
			      <td align="left">
			      	<span><%= PageUtil.string(model.getEmail())%></span>
			      </td>
			    </tr>
			    
			    <tr>
			      <td height="30" align="right">性别：</td>
			      <td align="left">
			      		<%if(model.getSex()==1){%>
			      			男
			      		<%}else{%>
			      			女
			      		<%} %>
			      </td>
			    </tr>
			    
			    <tr>
			      <td height="30" align="right">生日：</td>
			      <td align="left">
			      	<span><%=PageUtil.formatDate(model.getBirthday(),"yyyy-MM-dd") %></span>
			      </td>
			    </tr>
			    
			     <tr>
			      <td height="30" align="right">角色：</td>
			      <td align="left">
			      	<span><%=model.getRoles() %></span>
			      </td>
			    </tr>


			</table>
			</form>
		</div>
	</div>
	<%@ include file="../inc/footer.jsp" %> 
</div>
</body>
</html>